package ch.netcetera.planningpoker.client.ui.admin.moderate;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.Widget;

public class ModerationView extends Composite implements ModerationPresenter.IView {

    private static ModerationViewUiBinder uiBinder = GWT
            .create(ModerationViewUiBinder.class);

    interface ModerationViewUiBinder extends UiBinder<Widget, ModerationView> {
    }
    
    @UiField
    HasText gameTitle;
    
    @UiField
    Anchor adminUrl;
    
    @UiField
    Anchor publicUrl;
    
    @UiField
    FlowPanel allParticipants;
    
    @UiField
    FlowPanel currentRound;

    public ModerationView() {
        initWidget(uiBinder.createAndBindUi(this));
    }
    

    @Override
    public Widget asWidget() {
        return this;
    }

    @Override
    public void addToSlot(Object slot, Widget content) {
        
    }

    @Override
    public void removeFromSlot(Object slot, Widget content) {

    }

    @Override
    public void setInSlot(Object slot, Widget content) {
        
    }


    @Override
    public HasText getGameTitle() {
        return gameTitle;
    }


    @Override
    public void setAdminUrl(String url) {
        adminUrl.setHref(url);
        adminUrl.setText(url);
    }


    @Override
    public void setPublicUrl(String url) {
        publicUrl.setHref(url);
        publicUrl.setText(url);
    }


    @Override
    public HasWidgets getUserListContainer() {
        return allParticipants;
    }


    @Override
    public HasWidgets getCurrentRound() {
        return currentRound;
    }


}
